<?php
namespace app\index\controller;

use think\Controller;
use think\Db;

class Day20 extends Controller
{
     public function list()
     {
           $page=request()->get('page',1);
           $limit=request()->get('limit',5);
           $vip=request()->get('vip','');

           $where=[];

           if($vip !='')
           {
                $where['vip']=array('like',"%$vip%");
           }


           $res=Db::table('Day20')->where($where)->paginate($limit,false,['page'=>$page]);

           if(!$res)
           {
                 return json(['code'=>1,'msg'=>'失败','data'=>'']);
           }
                 return json(['code'=>0,'msg'=>'成功','data'=>$res]);
     }
}
